package com.educationx;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

public class LecturesActivity extends Activity {

	TextView textviewcoursetitle;
	private ListView list;
	private List<String> lectures;
	private ArrayAdapter<String> listAdapter ; 
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_lectures);
		
		String title = getIntent().getStringExtra("id");
		
		textviewcoursetitle = (TextView) findViewById(R.id.textViewCourseTitle);
		
		textviewcoursetitle.setText(title);
		
		list = (ListView) findViewById(android.R.id.list);

		lectures = new ArrayList<String>();
		
		lectures.add("Lecture 1 - Protocols");
		lectures.add("Lecture 2 - TCP/UDP Sockets");
		lectures.add("Lecture 3 - Broadcasting");
		lectures.add("Lecture 4 - Multicasting");
		lectures.add("Lecture 5 - Security");

		listAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, lectures);  
		list.setAdapter(listAdapter);
	}
	
	public void goToBack(View view) {
		this.finish();
	}
}
